package com.net.wanjian.networkhospitalmanager.adapter.base;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Description:
 * Created by lidongcai on 17/7/6.
 * Email:  lidongcaiocc@163.com
 */

public class BaseFragmentPagerListAdapter extends FragmentPagerAdapter {

    private List<Fragment> fragmentList;

    public BaseFragmentPagerListAdapter(FragmentManager fm, List<Fragment> fragmentList) {
        super(fm);
        this.fragmentList = fragmentList;
    }


    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return null == fragmentList ? 0 : fragmentList.size();
    }

   /* @Override
    public CharSequence getPageTitle(int position) {
        if (null == titleList){
            return super.getPageTitle(position);
        }else {
            return titleList.get(position);
        }
    }*/
}
